package java_DesignPattern.BehavioralPattern.MediatorPattern;

/**
 * 中介者模式---测试类
 */
public class Test {

    public static void main(String[] args) {
        HouseMediator mediator = new HouseMediator();

        Tenant tenant = new Tenant("张三", mediator);

        HouseOwner houseOwner = new HouseOwner("李四", mediator);

        mediator.setTenant(tenant);
        mediator.setHouseOwner(houseOwner);

        tenant.contact("我想租房");
        houseOwner.contact("我有一个房子");
    }
}
